(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/mall/mallindex" ], {
    "1b14": function(e, a, t) {
        (function(e) {
            function a(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            t("0cda"), a(t("66fd")), e(a(t("5bb1")).default);
        }).call(this, t("543d").createPage);
    },
    "1ffe": function(e, a, t) {
        t.d(a, "b", function() {
            return i;
        }), t.d(a, "c", function() {
            return o;
        }), t.d(a, "a", function() {
            return n;
        });
        var n = {
            uNavbar: function() {
                return t.e("uview-ui/components/u-navbar/u-navbar").then(t.bind(null, "dffe"));
            },
            uSearch: function() {
                return t.e("uview-ui/components/u-search/u-search").then(t.bind(null, "6bb4"));
            },
            uTabsSwiper: function() {
                return Promise.all([ t.e("common/vendor"), t.e("uview-ui/components/u-tabs-swiper/u-tabs-swiper") ]).then(t.bind(null, "d492"));
            },
            uImage: function() {
                return t.e("uview-ui/components/u-image/u-image").then(t.bind(null, "871d"));
            },
            uLoading: function() {
                return t.e("uview-ui/components/u-loading/u-loading").then(t.bind(null, "54b5"));
            },
            uIcon: function() {
                return t.e("uview-ui/components/u-icon/u-icon").then(t.bind(null, "bee6"));
            },
            uGap: function() {
                return t.e("uview-ui/components/u-gap/u-gap").then(t.bind(null, "130d"));
            },
            uEmpty: function() {
                return t.e("uview-ui/components/u-empty/u-empty").then(t.bind(null, "b399"));
            },
            uButton: function() {
                return t.e("uview-ui/components/u-button/u-button").then(t.bind(null, "cad8"));
            },
            uLoadmore: function() {
                return t.e("uview-ui/components/u-loadmore/u-loadmore").then(t.bind(null, "2220"));
            },
            uBackTop: function() {
                return t.e("uview-ui/components/u-back-top/u-back-top").then(t.bind(null, "feb3"));
            },
            sjTabBar: function() {
                return t.e("components/sj-tab-bar/sj-tab-bar").then(t.bind(null, "1ba9"));
            }
        }, i = function() {
            this.$createElement;
            this._self._c;
        }, o = [];
    },
    "5bb1": function(e, a, t) {
        t.r(a);
        var n, i = t("1ffe"), o = t("6471");
        for (n in o) "default" !== n && function(e) {
            t.d(a, e, function() {
                return o[e];
            });
        }(n);
        t("f0ed");
        var r = t("f0c5"), i = Object(r.a)(o.default, i.b, i.c, !1, null, null, null, !1, i.a, void 0);
        a.default = i.exports;
    },
    6406: function(e, n, i) {
        (function(r) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var e, o = (e = i("a34a")) && e.__esModule ? e : {
                default: e
            };
            function d(e, a, t, n, i, o, r) {
                try {
                    var l = e[o](r), d = l.value;
                } catch (e) {
                    return t(e), 0;
                }
                l.done ? a(d) : Promise.resolve(d).then(n, i);
            }
            function l(l) {
                return function() {
                    var e = this, r = arguments;
                    return new Promise(function(a, t) {
                        var n = l.apply(e, r);
                        function i(e) {
                            d(n, a, t, i, o, "next", e);
                        }
                        function o(e) {
                            d(n, a, t, i, o, "throw", e);
                        }
                        i(void 0);
                    });
                };
            }
            var s = getApp(), a = {
                data: function() {
                    return {
                        warn_num: r.getStorageSync("userinfo").s_1_num,
                        module_name: s.globalData.module_name,
                        sharetitle: "",
                        waimaidaohangcurrent: 0,
                        waimaidaohang_1: [],
                        waimaidaohang_2: [],
                        waimaidaohang_3: [],
                        waimaidaohang_4: [],
                        waimaittnew_daohang_height: 0,
                        sharepic: "",
                        appid_type: 0,
                        movietype: 1,
                        moviecometype: 1,
                        movielist: [],
                        moviecomelist: [],
                        movie_hotshuliang: 0,
                        qudao_tkl: "",
                        is_qudao_tkl: 0,
                        showAlert_taobaoauth: !1,
                        showAlert_login: !1,
                        elm_url: [],
                        meituan_url: [],
                        wxCode: "",
                        userinfo: [],
                        swiperItems: [],
                        waimaidaohang: [],
                        waimailist: [],
                        setting: [],
                        showAlert_meituan: !1,
                        kwd: "",
                        showAlert: !1,
                        currentCateIndex: 0,
                        leftTo: "cate1",
                        productListTo: "",
                        mainCate: [],
                        allProducts: [],
                        allProducts_temp: [],
                        mainHeight: 500,
                        scrollTimer: null,
                        contact_title: "",
                        contact_title_text: "",
                        contact_title_desc: "",
                        contact_id: "",
                        contact_type: "",
                        contact_thumb: "",
                        youlikes: [],
                        indexCateAndProducts: [],
                        top: 0,
                        footerCurrent: 0,
                        showToast_login: !1,
                        pageKey: 0,
                        height: "",
                        tabBar: [],
                        elmwm_act_id: 0,
                        mtpic: 0,
                        cityid: 40,
                        cityCode: 500100,
                        lat: 0,
                        lon: 0,
                        navItems: [],
                        navids: [],
                        navIndex: 0,
                        navType: "",
                        mallpage: 1,
                        mallpagesize: 20,
                        mallgoodslist: [],
                        loadStatus: "loadmore",
                        loadText: {
                            loadmore: "上拉加载更多",
                            loading: "努力加载中",
                            nomore: "实在没有了"
                        },
                        scrollTop: 0,
                        windowHeight: r.getStorageSync("windowHeight"),
                        navQuery: "",
                        mallindex_header_background: "",
                        search_width: "",
                        isFixed: !1,
                        headerHeight: 0,
                        nav_margin_top: "15rpx",
                        nav_padding_top: "0rpx",
                        search_height: "",
                        keyword: "",
                        search_placeholder: "",
                        fixed_heiht: 0,
                        mall_nav: [],
                        api_url: 0,
                        ad_banner: [],
                        ad_banner_list: [],
                        ad_banner_list2: [],
                        current_bannerid: 0,
                        banner_color: "",
                        swiper_color: "",
                        back_text_style: {
                            color: "#ffffff"
                        },
                        mall_type: "",
                        cateid: "",
                        mall_type_name: "",
                        appid: "",
                        path: "",
                        search_id: "",
                        uid: 0,
                        is_all: 0,
                        navchange: 0,
                        autoplay: !0
                    };
                },
                components: {
                    gracePage: function() {
                        i.e("graceUI/components/gracePage").then(function() {
                            return resolve(i("1021"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    graceSwiper: function() {
                        i.e("graceUI/components/graceSwiper").then(function() {
                            return resolve(i("9fc3"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    graceImg: function() {
                        i.e("graceUI/components/graceImg").then(function() {
                            return resolve(i("1d6e"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    graceNavBar: function() {
                        i.e("graceUI/components/graceNavBar2").then(function() {
                            return resolve(i("e74d"));
                        }.bind(null, i)).catch(i.oe);
                    }
                },
                props: {},
                onReady: function() {
                    var a = this;
                    return l(o.default.mark(function e() {
                        return o.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, a.$onLaunched;

                              case 2:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                onHide: function() {
                    this.autoplay = !1;
                },
                onReachBottom: function() {
                    "nomore" != this.loadStatus && this.loadMallgoodslist();
                },
                onShow: function(e) {
                    var n = this;
                    return l(o.default.mark(function e() {
                        var a, t;
                        return o.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, n.$onLaunched;

                              case 2:
                                for (n.autoplay = !0, n.tabBar = r.getStorageSync("tabbar"), a = 0; a < n.tabBar.list.length; a++) -1 != n.tabBar.list[a].url.indexOf("mall/mallindex") && (n.pageKey = a);
                                r.getStorageSync("openid") && (t = s.globalData.util.url("entry/wxapp/api", {
                                    m: s.globalData.module_name,
                                    o: "chkpid"
                                }), r.request({
                                    url: t,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        openid: r.getStorageSync("openid")
                                    },
                                    success: function(e) {
                                        e = s.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), e = JSON.parse(e);
                                        r.setStorageSync("pid_use_time", e), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && (r.setStorageSync("elmwm_url", ""), 
                                        r.setStorageSync("elmsc_url", ""), r.setStorageSync("elmwmposter", ""), r.setStorageSync("elmscposter", ""), 
                                        r.setStorageSync("pid_time", r.getStorageSync("pid_use_time")));
                                    }
                                })), n.windowHeight = r.getStorageSync("windowHeight");

                              case 9:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                onPullDownRefresh: function() {
                    this.cateid = "", this.navIndex = 0, this.mallpage = 1, this.mallpagesize = 20, 
                    this.loadMallgoodslist();
                },
                onPageScroll: function(a) {
                    var t = this;
                    0 == this.headerHeight && r.createSelectorQuery().select("#navheader").fields({
                        size: !0
                    }, function(e) {
                        e && (t.headerHeight = e.height);
                    }).exec(), this.scrollTop = a.scrollTop, r.createSelectorQuery().select("#scroll").boundingClientRect(function(e) {
                        e && (t.fixed_heiht = e.height);
                    }).exec(), 100 < this.headerHeight && a.scrollTop >= this.headerHeight ? (this.isFixed = !0, 
                    this.autoplay = !1, this.nav_margin_top = r.getStorageSync("headerHeight") + "px", 
                    this.nav_padding_top = "15rpx") : (this.isFixed = !1, this.nav_margin_top = "15rpx", 
                    this.nav_padding_top = "0rpx"), r.createSelectorQuery().select("#hover").boundingClientRect(function(e) {
                        a.scrollTop + 44 > e.height + r.upx2px(t.setting.waimaittnew_lunbo_height) ? t.autoplay = !1 : t.autoplay = !0;
                    }).exec();
                },
                onLoad: function(n) {
                    var i = this;
                    return l(o.default.mark(function e() {
                        var a, t;
                        return o.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, i.$onLaunched;

                              case 2:
                                r.showLoading({
                                    title: "加载中...",
                                    mask: !1
                                }), (a = i).setting = r.getStorageSync("setting"), a.tabBar = r.getStorageSync("tabbar"), 
                                a.userinfo = r.getStorageSync("userinfo"), a.search_placeholder = a.setting.index_search_placeholder || "搜索商品标题，先领券再购买", 
                                t = wx.getMenuButtonBoundingClientRect(), a.search_width = r.upx2px(500) + "px", 
                                a.search_height = 750 / r.getStorageSync("windowWidth") * t.height, a.mallindex_header_background = {
                                    backgroundColor: a.setting.waimaittnew_lunbobgcolor
                                }, a.swiper_color = a.setting.waimaittnew_lunbobgcolor, "all" == (t = n).mall_type ? (a.is_all = 1, 
                                a.navItems = r.getStorageSync("setting").index_malltype, a.mall_type = r.getStorageSync("setting").index_malltype[0].type, 
                                a.navType = r.getStorageSync("setting").index_malltype[0].type, a.navQuery = r.getStorageSync("setting").index_malltype[0].query) : (a.mall_type = t.mall_type, 
                                a.navType = t.mall_type), a.loadMallgoodslist(), r.setNavigationBarTitle({
                                    title: a.setting.waimaittnew_navigationBarTitleText
                                }), r.setNavigationBarColor({
                                    backgroundColor: a.setting.waimaittnew_navigationBarBackgroundColor,
                                    frontColor: a.setting.waimaittnew_navigationBarTextStyle
                                });

                              case 19:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                onShareAppMessage: function() {
                    var e = "pages/mall/mallindex?uid=" + r.getStorageSync("userinfo").user_id + "&mall_type=" + mall_type;
                    return {
                        title: this.sharetitle,
                        imageUrl: this.sharepic,
                        path: e
                    };
                },
                methods: {
                    swiperchange: function(e) {
                        this.swiper_color = this.swiperItems[e].banner_color, this.mallindex_header_background = {
                            backgroundColor: this.swiperItems[e].banner_color
                        }, r.setNavigationBarColor({
                            backgroundColor: this.swiperItems[e].banner_color,
                            frontColor: "#ffffff"
                        });
                    },
                    change_banner: function(e) {
                        this.current_bannerid = e, this.banner_color = this.ad_banner[e].banner_color;
                    },
                    search_blur: function() {
                        this.search_placeholder = this.setting.index_search_placeholder || "搜索商品标题，先领券再购买";
                    },
                    search_focus: function() {
                        this.search_placeholder = "";
                    },
                    toSearch: function(e) {
                        this.keyword = e, this.onSearch();
                    },
                    onSearch: function() {
                        "" != this.keyword.trim() ? this.getList("refresh", !0) : t.showToast({
                            title: "搜索内容不能为空",
                            duration: 2e3,
                            icon: "none"
                        });
                    },
                    tosearch: function(e) {
                        "" == this.keyword.trim() ? r.showToast({
                            title: "搜索内容不能为空",
                            duration: 2e3,
                            icon: "none"
                        }) : r.navigateTo({
                            url: "../../pagesA/pages/mallA/searchlist?keyword=" + e.trim() + "&mall_type=" + this.mall_type
                        });
                    },
                    clear: function() {
                        this.keyword = "";
                    },
                    openGoods: function(e) {
                        "youxuan" == e.currentTarget.dataset.pingtai ? r.navigateToMiniProgram({
                            appId: e.currentTarget.dataset.appid,
                            path: e.currentTarget.dataset.path
                        }) : r.navigateTo({
                            url: "../../pagesA/pages/mallA/detail?pt=" + e.currentTarget.dataset.pingtai + "&goodsid=" + e.currentTarget.dataset.goodsid + "&goodssign=" + e.currentTarget.dataset.goodssign + "&search_id=" + e.currentTarget.dataset.search_id
                        });
                    },
                    navChange: function(e) {
                        this.navchange = 1;
                        var a = this;
                        r.createSelectorQuery().select("#scroll").boundingClientRect(function(e) {
                            e && (a.fixed_heiht = e.height);
                        }).exec(), 100 < this.headerHeight && a.scrollTop >= this.headerHeight ? (this.isFixed = !0, 
                        this.nav_margin_top = r.getStorageSync("headerHeight") + "px", this.nav_padding_top = "15rpx") : (this.isFixed = !1, 
                        this.nav_margin_top = "15rpx", this.nav_padding_top = "0rpx");
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), this.scrollTop >= this.headerHeight && r.pageScrollTo({
                            scrollTop: this.headerHeight,
                            duration: 0
                        }), 1 == this.is_all ? (this.navIndex = e, this.navType = this.navItems[e].type, 
                        this.mall_type = this.navItems[e].type, this.navQuery = this.navItems[e].query, 
                        this.mallpage = 1, this.loadStatus = "loadmore", "youxuan" == this.navItems[e].type && r.getStorageSync("lon") && r.getStorageSync("lat") || "youxuan" != this.navItems[e].type ? this.loadMallgoodslist() : this.getLocation()) : (this.navIndex = e, 
                        this.cateid = this.navItems[e].id, this.navType = this.mall_type, this.mallpage = 1, 
                        this.loadStatus = "loadmore", this.loadMallgoodslist());
                    },
                    change: function(e) {
                        var a = this, t = this.tabBar.list[e];
                        if (this.pageKey = e, r.setStorageSync("pageKey", e), 1 == t.adtype) {
                            if (1 == t.appid_type && r.getStorageSync("mtwm_url")) return void r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtwm_url")
                            });
                            if (1 == t.appid_type && !r.getStorageSync("mtwm_url")) return a.appid_type = 1, 
                            void a.meituan_urlFun();
                            if (2 == t.appid_type && r.getStorageSync("mtsc_url")) return void r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtsc_url")
                            });
                            if (2 == t.appid_type && !r.getStorageSync("mtsc_url")) return a.appid_type = 2, 
                            void a.meituan_urlFun();
                            if (3 == t.appid_type && r.getStorageSync("elmwm_url")) return r.navigateToMiniProgram({
                                appId: "wxece3a9a4c82f58c9",
                                path: r.getStorageSync("elmwm_url")
                            }), a.updatepid(), void console.log(r.getStorageSync("elmwm_url"));
                            if (3 == t.appid_type && !r.getStorageSync("elmwm_url")) return a.appid_type = 3, 
                            void a.gettaobaoauth();
                            if (4 == t.appid_type && r.getStorageSync("elmsc_url")) return r.navigateToMiniProgram({
                                appId: "wxece3a9a4c82f58c9",
                                path: r.getStorageSync("elmsc_url")
                            }), a.updatepid(), void console.log(r.getStorageSync("elmsc_url"));
                            if (4 == t.appid_type && !r.getStorageSync("elmsc_url")) return console.log("ccc"), 
                            a.appid_type = 4, void a.gettaobaoauth();
                            if (0 == t.appid_type) return void r.navigateToMiniProgram({
                                appId: t.appid,
                                path: t.path
                            });
                        }
                        if (5 != t.adtype) if (4 != t.adtype) 2 != t.adtype && 3 != t.adtype || (a = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "ad_kefubind"
                        }), r.request({
                            url: a,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                adtype: "ad",
                                adid: t.adid,
                                openid: r.getStorageSync("openid")
                            },
                            success: function(e) {}
                        }), this.contact_title_desc = "", this.contact_type = "ad", this.contact_id = t.adid, 
                        this.contact_title = t.title, this.contact_title_text = t.title_text, this.contact_title_desc = t.title_desc, 
                        this.contact_thumb = r.getStorageSync("setting").dianwo, this.showDialog3()); else {
                            r.setStorageSync("index_nav", t.url);
                            var n = getCurrentPages();
                            n.reverse();
                            for (var i = t.url.replace("../", ""), o = 0; o < n.length; o++) if (-1 != n[o].route.indexOf(i)) return void r.navigateBack({
                                delta: o
                            });
                            if (-1 == t.url.indexOf("../index/") && -1 == t.url.indexOf("../meituangroup/") && -1 == t.url.indexOf("../user/") && -1 == t.url.indexOf("../movie/") && -1 == t.url.indexOf("../shop/") && -1 == t.url.indexOf("../kefu/") && -1 == t.url.indexOf("../elm/") && -1 == t.url.indexOf("../meituan/") && -1 == t.url.indexOf("../mall/")) return -1 != t.url.indexOf("../../pages/index/") || -1 != t.url.indexOf("../../pages/user/") || -1 != t.url.indexOf("../../pages/kefu/") ? (i = t.url.replace("../../pages/", "../"), 
                            void r.navigateTo({
                                url: i
                            })) : -1 != t.url.indexOf("../../pages/meituan/") || -1 != t.url.indexOf("../../pages/elm/") || -1 != t.url.indexOf("../../pages/eat/") ? (i = t.url.replace("../../pages/", "../../pagesA/pages/"), 
                            void r.navigateTo({
                                url: i
                            })) : -1 != t.url.indexOf("../../pagesA/pages/movie/") || -1 != t.url.indexOf("../../pagesA/pages/shop/") || -1 != t.url.indexOf("../../pagesA/pages/mallA/mallindex") ? (i = t.url.replace("../../pagesA/pages/", "../"), 
                            void r.navigateTo({
                                url: i
                            })) : -1 == t.url.indexOf("../../pagesA/pages/movieA/") && -1 == t.url.indexOf("../../pagesA/pages/shopA/") && -1 == t.url.indexOf("../../pagesA/pages/meituan/") && -1 == t.url.indexOf("../../pagesA/pages/elm/") && -1 == t.url.indexOf("../../pagesA/pages/eat/") && -1 == t.url.indexOf("../../pagesA/pages/userA/") && (-1 != t.url.indexOf("../meituan/") || -1 != t.url.indexOf("../elm/") || -1 != t.url.indexOf("../eat/")) ? (i = t.url.replace("../", "../../pagesA/pages/"), 
                            void r.navigateTo({
                                url: i
                            })) : void r.navigateTo({
                                url: t.url
                            });
                            r.navigateTo({
                                url: t.url
                            });
                        } else r.navigateTo({
                            url: "../kefu/webview?return_url=" + encodeURIComponent(t.url)
                        });
                    },
                    fatherHeight: function(e) {
                        this.height = e;
                    },
                    waimaidaohangchange: function(e) {
                        this.waimaidaohangcurrent = e.detail.current;
                    },
                    updatepid: function() {
                        var e = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "updatepid"
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid")
                            },
                            success: function(e) {}
                        });
                    },
                    taped: function(e) {
                        e = this.swiperItems[e];
                        this.openad(e);
                    },
                    taped_banner: function(e) {
                        e = this.ad_banner[e];
                        this.openad(e);
                    },
                    loadMallgoodslist: function() {
                        var i, e;
                        "nomore" != this.loadStatus ? "youxuan" != (i = this).navType || 0 < r.getStorageSync("lat") && 0 < r.getStorageSync("lon") ? (i.loadStatus = "loading", 
                        e = s.globalData.util.url("entry/wxapp/mallindex", {
                            m: s.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                type: i.mall_type,
                                cateid: i.cateid,
                                page: i.mallpage,
                                pagesize: i.mallpagesize,
                                lon: r.getStorageSync("lon"),
                                lat: r.getStorageSync("lat"),
                                is_all: i.is_all,
                                navchange: i.navchange,
                                system_type: r.getStorageSync("systemtype")
                            },
                            success: function(e) {
                                if (200 == e.data.code) {
                                    if (!i.navchange) {
                                        i.swiperItems = e.data.lunbo, 1 == e.data.waimaidaohang.length ? i.waimaidaohang_1 = e.data.waimaidaohang[0] : 2 == e.data.waimaidaohang.length ? (i.waimaidaohang_1 = e.data.waimaidaohang[0], 
                                        i.waimaidaohang_2 = e.data.waimaidaohang[1]) : 3 == e.data.waimaidaohang.length ? (i.waimaidaohang_1 = e.data.waimaidaohang[0], 
                                        i.waimaidaohang_2 = e.data.waimaidaohang[1], i.waimaidaohang_3 = e.data.waimaidaohang[2]) : 4 == e.data.waimaidaohang.length && (i.waimaidaohang_1 = e.data.waimaidaohang[0], 
                                        i.waimaidaohang_2 = e.data.waimaidaohang[1], i.waimaidaohang_3 = e.data.waimaidaohang[2], 
                                        i.waimaidaohang_4 = e.data.waimaidaohang[3]), i.waimailist = e.data.waimailist, 
                                        i.mall_nav = e.data.mall_nav, i.ad_banner = e.data.ad_banner, i.ad_banner_list = e.data.ad_banner_list, 
                                        i.ad_banner_list2 = e.data.ad_banner_list2, 0 < e.data.ad_banner.length ? i.banner_color = e.data.ad_banner[0].banner_color : 0 < e.data.ad_banner_list.length ? i.banner_color = e.data.ad_banner_list[0].banner_color2 : 0 < e.data.ad_banner_list2.length && (i.banner_color = e.data.ad_banner_list2[0].banner_color2), 
                                        i.sharetitle = e.data.sharetitle, i.sharepic = e.data.sharepic, i.waimaittnew_daohang_height = e.data.waimaittnew_daohang_height, 
                                        1 == i.is_all ? i.mall_type_name = "" : i.mall_type_name = e.data.mall_type_name;
                                        for (var a = wx.getMenuButtonBoundingClientRect(), t = 0, n = 0; n < i.mall_type_name.length; n++) i.mall_type_name.charCodeAt(n) < 0 || 255 < i.mall_type_name.charCodeAt(n) ? t += 2 : t += 1;
                                        0 == (t /= 2) ? i.search_width = a.left - r.upx2px(100) + "px" : 2 == t ? i.search_width = a.left - r.upx2px(165) + "px" : 3 == t ? i.search_width = a.left - r.upx2px(200) + "px" : 4 == t && (i.search_width = a.left - r.upx2px(240) + "px"), 
                                        1 == i.is_all ? i.navItems = i.setting.index_malltype : i.navItems = e.data.cate;
                                    }
                                    a = e.data.mallgoodslist;
                                    1 == e.data.has_more ? i.loadStatus = "loadmore" : i.loadStatus = "nomore", i.mallpage = e.data.page, 
                                    1 == i.mallpage ? (i.mallpagesize = e.data.pagesize, i.mallgoodslist = [], i.mallgoodslist = a) : a && (i.mallgoodslist = i.mallgoodslist.concat(a)), 
                                    i.mallpage++;
                                }
                                r.hideLoading(), r.stopPullDownRefresh();
                            }
                        })) : i.getLocation() : r.hideLoading();
                    },
                    openShopad: function(e) {
                        e = e.currentTarget.dataset;
                        this.api_url = e.item_id, this.openad(e);
                    },
                    openad: function(t) {
                        var e, n = this;
                        1 == t.is_warm && t.tplid ? (e = s.globalData.util.url("entry/wxapp/subscribemessage2", {
                            m: s.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                id: t.item_id,
                                type: 2
                            },
                            success: function(e) {
                                var a;
                                r.setStorageSync("subscribemessage" + t.item_id, e.data.warm_daynum), r.getStorageSync("subscribemessage" + t.item_id) < t.tplid_oneday_num ? (a = new Array(), 
                                a = t.tplid.split(","), wx.requestSubscribeMessage({
                                    tmplIds: a,
                                    success: function(e) {
                                        "reject" == e[a[0]] || (e = s.globalData.util.url("entry/wxapp/subscribemessage2", {
                                            m: s.globalData.module_name
                                        }), r.request({
                                            url: e,
                                            method: "POST",
                                            header: {
                                                "content-type": "application/x-www-form-urlencoded"
                                            },
                                            data: {
                                                openid: r.getStorageSync("openid"),
                                                id: t.item_id,
                                                type: 1
                                            },
                                            success: function(e) {
                                                r.setStorageSync("subscribemessage" + t.item_id, e.data.warm_daynum);
                                            }
                                        })), n.openad2(t);
                                    },
                                    fail: function(e) {
                                        e.openad2(t);
                                    }
                                })) : n.openad2(t);
                            }
                        })) : n.openad2(t);
                    },
                    openad2: function(a) {
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var e, t, n = this;
                        1 == a.adtype || 14 == a.adtype || 15 == a.adtype ? 0 < a.appid_type2 || 14 == a.adtype || 15 == a.adtype ? (e = s.globalData.util.url("entry/wxapp/index_jump", {
                            m: s.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                adid: a.item_id
                            },
                            success: function(e) {
                                1 == e.data.jump_type ? r.navigateToMiniProgram({
                                    appId: e.data.jump_appid,
                                    path: e.data.jump_path
                                }) : 2 == e.data.jump_type ? (n.contact_type = "ad_new", n.contact_id = a.item_id, 
                                n.contact_title = e.data.title, n.contact_title_text = e.data.title_text, n.contact_title_desc = e.data.title_desc, 
                                n.contact_thumb = r.getStorageSync("setting").dianwo, n.showDialog3()) : r.showToast({
                                    title: e.data.msg,
                                    icon: "none"
                                }), r.hideLoading();
                            }
                        })) : (r.navigateToMiniProgram({
                            appId: a.appid,
                            path: a.path
                        }), r.hideLoading()) : 5 == a.adtype ? (r.navigateTo({
                            url: "../kefu/webview?return_url=" + encodeURIComponent(a.url) + "&t=" + Date.parse(new Date())
                        }), r.hideLoading()) : 10 == a.adtype ? (this.$refs.addmini.showAddMiniProgramTips = 1, 
                        r.hideLoading()) : 11 == a.adtype || 7 == a.adtype ? r.hideLoading() : 4 == a.adtype ? (r.setStorageSync("index_nav", a.url), 
                        -1 != a.url.indexOf("../index/") || -1 != a.url.indexOf("../meituangroup/") || -1 != a.url.indexOf("../user/") || -1 != a.url.indexOf("../movie/") || -1 != a.url.indexOf("../shop/") || -1 != a.url.indexOf("../kefu/") || -1 != a.url.indexOf("../meituan/") || -1 != a.url.indexOf("../elm/") || -1 != a.url.indexOf("../mall/") ? r.navigateTo({
                            url: a.url
                        }) : -1 != a.url.indexOf("../../../pages/index/") || -1 != a.url.indexOf("../../../pages/user/") || -1 != a.url.indexOf("../../../pages/kefu/") ? (t = a.url.replace("../../../pages/", "../"), 
                        r.navigateTo({
                            url: t
                        })) : -1 != a.url.indexOf("../../../pages/meituan/") || -1 != a.url.indexOf("../../../pages/elm/") || -1 != a.url.indexOf("../../../pages/eat/") ? (t = a.url.replace("../../../pages/", "../../pagesA/pages/"), 
                        r.navigateTo({
                            url: t
                        })) : -1 != a.url.indexOf("../../pagesA/pages/movie/") || -1 != a.url.indexOf("../../pagesA/pages/shop/") || -1 != a.url.indexOf("../../pagesA/pages/mallA/mallindex") ? (t = a.url.replace("../../pagesA/pages/", "../"), 
                        r.navigateTo({
                            url: t
                        })) : -1 == a.url.indexOf("../../pagesA/pages/movieA/") && -1 == a.url.indexOf("../../pagesA/pages/shopA/") && -1 == a.url.indexOf("../../pagesA/pages/meituan/") && -1 == a.url.indexOf("../../pagesA/pages/elm/") && -1 == a.url.indexOf("../../pagesA/pages/eat/") && -1 == a.url.indexOf("../../pagesA/pages/userA/") && (-1 != a.url.indexOf("../meituan/") || -1 != a.url.indexOf("../elm/") || -1 != a.url.indexOf("../eat/")) ? (t = a.url.replace("../", "../../pagesA/pages/"), 
                        r.navigateTo({
                            url: t
                        })) : r.navigateTo({
                            url: a.url
                        }), r.hideLoading(), r.hideLoading()) : 2 == a.adtype || 3 == a.adtype || 9 == a.adtype ? (e = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "ad_kefubind"
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                adtype: "ad_new",
                                adid: a.item_id,
                                openid: r.getStorageSync("openid")
                            },
                            success: function(e) {}
                        }), this.contact_title_desc = "", this.contact_type = "ad_new", this.contact_id = a.item_id, 
                        this.contact_title = a.title, this.contact_title_text = a.title_text, this.contact_title_desc = a.title_desc, 
                        this.contact_thumb = r.getStorageSync("setting").dianwo, r.hideLoading(), this.showDialog3()) : 8 == a.adtype ? 1 == a.mall_adtype ? r.navigateTo({
                            url: "../../pagesA/pages/mallA/huodong?id=" + a.item_id
                        }) : 2 == a.mall_adtype && this.loadMallapigoodslist(a) : 12 == a.adtype ? (r.previewImage({
                            urls: [ a.open_thumb ]
                        }), r.hideLoading()) : 13 == a.adtype && this.getCoupon(a);
                    },
                    getCoupon: function(a) {
                        var t = this;
                        if (r.getStorageSync("path" + a.item_id)) return r.getStorageSync("appid" + a.item_id) ? r.navigateToMiniProgram({
                            appId: r.getStorageSync("appid" + a.item_id),
                            path: r.getStorageSync("path" + a.item_id)
                        }) : r.setClipboardData({
                            data: r.getStorageSync("path" + a.item_id),
                            success: function(e) {
                                r.showToast({
                                    title: t.setting.mall_tkl_text || "内容已复制",
                                    icon: "none"
                                });
                            }
                        }), void r.hideLoading();
                        var e = s.globalData.util.url("entry/wxapp/mall_goods_getcoupon", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                goodsid: a.goodsid,
                                pingtai: a.mall_type,
                                goodssign: a.goodssign,
                                search_id: t.search_id,
                                quan_url: a.quan_url,
                                uid: t.uid,
                                id: a.item_id
                            },
                            success: function(e) {
                                200 == e.data.code && ("tb" == a.mall_type ? (t.path = e.data.tkl, r.setStorageSync("path" + a.item_id, e.data.tkl), 
                                r.setStorageSync("pid_time", e.data.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setClipboardData({
                                    data: e.data.tkl,
                                    success: function(e) {
                                        r.showToast({
                                            title: t.setting.mall_tkl_text || "内容已复制",
                                            icon: "none"
                                        });
                                    }
                                })) : (t.appid = e.data.appid, t.path = e.data.path, r.setStorageSync("appid" + a.item_id, e.data.appid), 
                                r.setStorageSync("path" + a.item_id, e.data.path), r.navigateToMiniProgram({
                                    appId: e.data.appid,
                                    path: e.data.path
                                })), r.hideLoading());
                            }
                        });
                    },
                    loadMallapigoodslist: function(a) {
                        this.loadStatus = "loading";
                        var e = s.globalData.util.url("entry/wxapp/mallapigoodslist", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                id: a.item_id,
                                lon: r.getStorageSync("lon"),
                                lat: r.getStorageSync("lat")
                            },
                            success: function(e) {
                                200 == e.data.code && (e.data.appid ? r.navigateToMiniProgram({
                                    appId: e.data.appid,
                                    path: e.data.path
                                }) : r.navigateTo({
                                    url: "../../pagesA/pages/mallA/huodong?id=" + a.item_id
                                })), r.hideLoading();
                            }
                        });
                    },
                    getLocation: function() {
                        var t = this;
                        r.getLocation({
                            type: "wgs84",
                            success: function(e) {
                                var a = s.globalData.util.url("entry/wxapp/address", {
                                    m: s.globalData.module_name
                                });
                                r.setStorageSync("lon", e.longitude), r.setStorageSync("lat", e.latitude), r.request({
                                    url: a,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        lon: e.longitude,
                                        lat: e.latitude
                                    },
                                    success: function(e) {
                                        r.setStorageSync("cityCode", e.data.data.cityCode), r.setStorageSync("city", e.data.data.city), 
                                        r.setStorageSync("cityid", e.data.data.ci), 0 < e.data.data.ci && 0 < r.getStorageSync("lat") ? t.loadMallgoodslist() : r.showModal({
                                            title: "系统提示",
                                            content: "请授权获取您的位置信息",
                                            showCancel: !0,
                                            success: function(e) {
                                                e.confirm && t.again_getLocation(), t.mallgoodslist = [], t.loadStatus = "nomore", 
                                                r.setStorageSync("lon", ""), r.setStorageSync("lat", ""), r.setStorageSync("cityCode", ""), 
                                                r.setStorageSync("city", ""), r.setStorageSync("cityid", ""), r.hideLoading();
                                            }
                                        });
                                    }
                                });
                            },
                            fail: function(e) {
                                t.mallgoodslist = [], t.loadStatus = "nomore", r.setStorageSync("lon", ""), r.setStorageSync("lat", ""), 
                                r.setStorageSync("cityCode", ""), r.setStorageSync("city", ""), r.setStorageSync("cityid", ""), 
                                r.hideLoading();
                            }
                        });
                    },
                    again_getLocation: function() {
                        var a = this;
                        r.getSetting({
                            success: function(e) {
                                null != e.authSetting["scope.userLocation"] && 1 != e.authSetting["scope.userLocation"] ? r.showModal({
                                    title: "是否授权当前位置",
                                    content: "需要获取您的地理位置，请确认授权，否则无法获取您所需数据",
                                    success: function(e) {
                                        e.cancel ? r.showToast({
                                            title: "授权失败",
                                            icon: "success",
                                            duration: 1e3
                                        }) : e.confirm && r.openSetting({
                                            success: function(e) {
                                                1 == e.authSetting["scope.userLocation"] ? (r.showToast({
                                                    title: "授权成功",
                                                    icon: "success",
                                                    duration: 1e3
                                                }), a.getLocation(a)) : r.showToast({
                                                    title: "授权失败",
                                                    icon: "success",
                                                    duration: 1e3
                                                });
                                            }
                                        });
                                    }
                                }) : (e.authSetting["scope.userLocation"], a.getLocation(a));
                            }
                        });
                    }
                }
            };
            n.default = a;
        }).call(this, i("543d").default);
    },
    6471: function(e, a, t) {
        t.r(a);
        var n, i = t("6406"), o = t.n(i);
        for (n in i) "default" !== n && function(e) {
            t.d(a, e, function() {
                return i[e];
            });
        }(n);
        a.default = o.a;
    },
    b637: function(e, a, t) {},
    f0ed: function(e, a, t) {
        var n = t("b637");
        t.n(n).a;
    }
}, [ [ "1b14", "common/runtime", "common/vendor" ] ] ]);